//
//  AppDelegate.swift
//  main
//
//  Created by Vencent on 2020/11/12.
//

import UIKit
import SwiftCTRouter
import AppUtil

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    lazy var rootViewController: UIViewController = {
        let homeVC = SwiftCTRouter.DemoPageA_Demo_ViewController() ?? UIViewController()
        let nav = NavigationController.init(rootViewController: homeVC)
        let tabbarVC: TabBarController = .init()
        tabbarVC.viewControllers = [nav]
        return tabbarVC
    }()

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        
        Config.identifier = Bundle.main.bundleIdentifier ?? ""
        
        window = UIWindow.init(frame: UIScreen.main.bounds)
        
        window?.rootViewController = rootViewController
        window?.makeKeyAndVisible()
        return true
    }


}

